'\" t
.\"     Title: \fBndb_index_stat\fR
.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: 11/15/2013
.\"    Manual: MySQL Database System
.\"    Source: MySQL 5.6
.\"  Language: English
.\"
.TH "\FBNDB_INDEX_STAT\FR" "1" "11/15/2013" "MySQL 5\&.6" "MySQL Database System"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.\" ndb_index_stat
.SH "NAME"
ndb_index_stat \- NDB index statistics utility
.SH "SYNOPSIS"
.HP \w'\fBndb_index_stat\ \fR\fB\fIoptions\fR\fR\ 'u
\fBndb_index_stat \fR\fB\fIoptions\fR\fR
.SH "DESCRIPTION"
.PP
\fBndb_index_stat\fR
\&.\&.\&.
        Usage
.PP
To obtain basic index statistics about a given
NDB
table, invoke
\fBndb_index_stat\fR
as shown here, with the name of the table as the first argument and the name of the database containing this table specified immediately following it, using the
\fB\-\-database\fR
(\fB\-d\fR) option:
.sp
.if n \{\
.RS 4
.\}
.nf
ndb_index_stat \fItable\fR \-d \fIdatabase\fR
.fi
.if n \{\
.RE
.\}
.PP
In this example, we use
\fBndb_index_stat\fR
to obtain such information about an
NDB
table named
mytable
in the
test
database:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBndb_index_stat \-d test mytable\fR
table:mytable index:PRIMARY fragCount:4
sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0
query cache: valid:1 sampleCount:0 totalBytes:0
times in ms: save: 12\&.380 sort: 0\&.001
NDBT_ProgramExit: 0 \- OK
.fi
.if n \{\
.RE
.\}
.PP
The
\fB\-\-verbose\fR
option provides some additional output, as shown here:
.sp
.if n \{\
.RS 4
.\}
.nf
shell> \fBndb_index_stat \-d test mytable \-\-verbose\fR
random seed 1337010518
connected
loop 1 of 1
table:mytable index:PRIMARY fragCount:4
sampleVersion:2 loadTime:1336751773 sampleCount:0 keyBytes:0
read stats
query cache created
query cache: valid:1 sampleCount:0 totalBytes:0
times in ms: save: 20\&.766 sort: 0\&.001
disconnected
NDBT_ProgramExit: 0 \- OK
shell>
.fi
.if n \{\
.RE
.\}
.sp
        Options
.PP
The following table includes options that are specific to the MySQL Cluster
\fBndb_index_stat\fR
utility\&. Additional descriptions are listed following the table\&. For options common to most MySQL Cluster programs (including
\fBndb_index_stat\fR), see
Options Common to MySQL Cluster Programs(1)\&.
.sp
.it 1 an-trap
.nr an-no-space-flag 1
.nr an-break-flag 1
.br
.B Table\ \&17.21.\ \&ndb_index_stat Options and Variables: MySQL Cluster NDB 7.3
.TS
allbox tab(:);
lB lB lB.
T{
Format
T}:T{
Description
T}:T{
Added / Removed
T}
.T&
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l
l l l.
T{
.PP
\-\-database=name,
.PP
\-d
T}:T{
Name of the database containing the table\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-delete
T}:T{
Delete index statistics for the given table, stopping any auto\-update
            previously configured\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-update
T}:T{
Update index statistics for the given table, restarting any auto\-update
            previously configured\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-dump
T}:T{
Print the query cache\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-query=#
T}:T{
Perform a number of random range queries on first key attr (must be int
            unsigned)\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-drop
T}:T{
Drop any statistics tables and events in NDB kernel (all statistics are
            lost)
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-create
T}:T{
Create all statistics tables and events in NDB kernel, if none of them
            already exist
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-create\-if\-not\-exist
T}:T{
Create any statistics tables and events in NDB kernel that do not
            already exist\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-create\-if\-not\-valid
T}:T{
Create any statistics tables or events that do not already exist in the
            NDB kernel\&. after dropping any that are invalid\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-check
T}:T{
Verify that NDB system index statistics and event tables exist\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-skip\-tables
T}:T{
Do not apply sys\-* options to tables\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-sys\-skip\-events
T}:T{
Do not apply sys\-* options to events\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-verbose,
.PP
\-v
T}:T{
Turn on verbose output
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
T{
.PP
\-\-loops=#
T}:T{
Set the number of times to perform a given command\&. Default is 0\&.
T}:T{
.PP
All MySQL 5\&.6 based releases
T}
.TE
.sp 1
.PP
\fBndb_index_stat statistics options\fR. The following options are used to generate index statistics\&. They work with a given table and database\&. They cannot be mixed with
ndb_index_stat system options\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" database option (ndb_index_stat).\" -d option (ndb_index_stat)\fB\-\-database=\fR\fB\fIname\fR\fR,
\fB\-d \fR\fB\fIname\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-database=name
T}
T{
\ \&
T}:T{
\-d
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
string
T}
:T{
\fBDefault\fR
T}:T{
[none]
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
The name of the database that contains the table being queried\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" delete option (ndb_index_stat)\fB\-\-delete\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-delete
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Delete the index statistics for the given table, stopping any auto\-update that was previously configured\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" update option (ndb_index_stat)\fB\-\-update\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-update
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Update the index statistics for the given table, and restart any auto\-update that previously configured\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" dump option (ndb_index_stat)\fB\-\-dump\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-dump
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Dump the contents of the query cache\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" query option (ndb_index_stat)\fB\-\-query=\fR\fB\fI#\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-query=#
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
numeric
T}
:T{
\fBDefault\fR
T}:T{
0
T}
:T{
\fBRange\fR
T}:T{
0 \&.\&. MAX_INT
T}
.TE
.sp 1
Perform random range queries on first key attribute (must be int unsigned)\&.
.RE
.PP
\fBndb_index_stat system options\fR. The following options are used to generate and update the statistics tables in the NDB kernel\&. They cannot be mixed with
ndb_index_stat statistics options\&.
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-drop option (ndb_index_stat)\fB\-\-sys\-drop\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-drop
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Drop all statistics tables and events in the NDB kernel\&.
\fIThis causes all statistics to be lost\fR\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-create option (ndb_index_stat)\fB\-\-sys\-create\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-create
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Create all statistics tables and events in the NDB kernel\&. This works only if none of them exist previously\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-create-if-not-exist option (ndb_index_stat)\fBsys\-create\-if\-not\-exist\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-create\-if\-not\-exist
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Create any NDB system statistics tables or events (or both) that do not already exist when the program is invoked\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-create-if-not-valid option (ndb_index_stat)\fB\-\-sys\-create\-if\-not\-valid\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-create\-if\-not\-valid
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Create any NDB system statistics tables or events that do not already exist, after dropping any that are invalid\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-check option (ndb_index_stat)\fB\-\-sys\-check\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-check
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Verify that all required system statistics tables and events exist in the NDB kernel\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-skip-tables option (ndb_index_stat)\fB\-\-sys\-skip\-tables\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-skip\-tables
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Do not apply any
\fB\-\-sys\-*\fR
options to any statistics tables\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" sys-skip-events option (ndb_index_stat)\fB\-\-sys\-skip\-events\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-sys\-skip\-events
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Do not apply any
\fB\-\-sys\-*\fR
options to any events\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" verbose option (ndb_index_stat)\fB\-\-verbose\fR
.TS
allbox tab(:);
l l s s
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-verbose
T}
T{
\ \&
T}:T{
\-v
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
boolean
T}
:T{
\fBDefault\fR
T}:T{
true
T}
:T{
\fBRange\fR
T}:T{
\&.\&.
T}
.TE
.sp 1
Turn on verbose output\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
.\" loops option (ndb_index_stat)\fB\-\-loops=\fR\fB\fI#\fR\fR
.TS
allbox tab(:);
l l s s
l l s s
^ l l s
^ l l s
^ l l s.
T{
\fBCommand\-Line Format\fR
T}:T{
\-\-loops=#
T}
T{
\ \&
T}:T{
\fBPermitted Values\fR
T}
:T{
\fBType\fR
T}:T{
numeric
T}
:T{
\fBDefault\fR
T}:T{
0
T}
:T{
\fBRange\fR
T}:T{
0 \&.\&. MAX_INT
T}
.TE
.sp 1
Repeat commands this number of times (for use in testing)\&.
.RE
.SH "COPYRIGHT"
.br
.PP
Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
.sp
.SH "SEE ALSO"
For more information, please refer to the MySQL Reference Manual,
which may already be installed locally and which is also available
online at http://dev.mysql.com/doc/.
.SH AUTHOR
Oracle Corporation (http://dev.mysql.com/).
